<script>
	export default {
		onLaunch: function() {
			this.initLogin()
		},
		methods: {
			// 退出app后再次重启app, 用户信息不丢失
			initLogin() {
				const userInfo = uni.getStorageSync('userInfo')
				const accessToken = uni.getStorageSync('accessToken')
				if (userInfo && accessToken) {
					this.$store.commit('setState', {
						userInfo,
						accessToken
					})
				}
			}
		},
		onShow: function() {
			// console.log('App Show')
		},
		onHide: function() {
			// console.log('App Hide')
		}
	}
</script>

<style>
	/*每个页面公共css */
	@import url("~@/static/icon/iconfont.css");
	/* 引入彩色图标 */
	/* #ifndef APP-NVUE */
	@import url("~@/static/icon/iconfont-app-icon.css");
	/* #endif */
	@import url("@/common/css/common.css");
</style>
